1. Field of the Invention
The present invention relates to a motor drive control device, a motor drive control method, and a non-transitory computer-readable medium.
2. Description of the Related Art
In the related art, a stepping motor has been used for conveying a document or controlling movement of a reading optical system in a multifunction peripheral. Basically, to control driving of the stepping motor, a motor is started to be driven at a drive frequency not to cause a loss of synchronization, accelerated to a target speed, decelerated again within a range in which a loss of synchronization is not caused, and stopped. A loss of synchronization of the motor is likely to be caused as a difference between a current pulse period and the next pulse period increases, so that a value set in an acceleration/deceleration table needs to be set within a range in which a loss of synchronization is not caused. When the target speed is a speed that does not cause a loss of synchronization, acceleration and deceleration are not required.
A period setting in an acceleration/deceleration region for preventing a loss of synchronization is stored as a table in a region such as a static RAM (SRAM), and a total number of pulses thereof is set as the number of pulses corresponding to an exciting mode (the number is uniquely determined such as a multiple of 8 in a case of a W1-2-phase). Due to this, known is a technique for reducing a CPU load in driving the motor and stopping the motor at an exciting position corresponding to the exciting mode by successively reading values without a central processing unit (CPU).
For example, disclosed is a technique for setting the acceleration/deceleration table in the SRAM and the like in advance, and controlling acceleration and deceleration of motor driving while the CPU checks free space of an image accumulating memory (refer to Japanese Patent Application Laid-open No. 2010-220108).
Japanese Patent Application Laid-open No. 2006-296095 discloses a technique for calculating acceleration from read acceleration data, and sequentially reading out deceleration data to stop a motor operation in the case that an anomaly occurs in acceleration, for the purpose of forcibly stopping motor driving when an anomaly occurs in the acceleration data.
However, in the motor driving control in the related art described above, to forcibly stop the motor during acceleration for some reasons, transition needs to be made to deceleration control after acceleration control is completed for preventing a loss of synchronization. Due to this control, the motor driving cannot be stopped at a forced stop position, and a minimum number of drive pulses becomes constant from the time when the motor is started to be driven until the motor is stopped.
When the motor driving is stopped at the forced stop position without performing a deceleration operation, the motor is stopped irrespective of the exciting position thereof although a loss of synchronization is not caused, so that a driving torque is not enough in re-driving and a load on the motor itself due to quick stop is heavy.
According to Japanese Patent Application Laid-open No. 2010-220108, when a stop command is received during acceleration, a loss of synchronization of the motor is caused in transition from an acceleration state to a deceleration state depending on timing of receiving the stop command. According to Japanese Patent Application Laid-open No. 2006-296095, the motor cannot stop at the exciting position when the motor is stopped.
Therefore, it is desirable to provide a motor drive control device, a motor drive control method, and a non-transitory computer-readable medium capable of stopping motor driving at the exciting position without causing a loss of synchronization, and stopping the motor driving at a minimum number of pulses from the forced stop position in stopping the motor driving during acceleration.